import React from 'react'
import ReactDOM from 'react-dom/client'
import App from './App'
import store from './redux/store'

const root = ReactDOM.createRoot(document.getElementById('root'))
root.render(<App />)

// 每当store修改，所有组件都会重新调render（有diff，性能影响还行）
store.subscribe(()=>{
  root.render(<App />)
})